/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package edu.wpi.first.wpilibj.templates.subsystems;

import edu.wpi.first.wpilibj.Jaguar;
import edu.wpi.first.wpilibj.SpeedController;
import edu.wpi.first.wpilibj.command.Subsystem;
import edu.wpi.first.wpilibj.templates.RobotMap;
import edu.wpi.first.wpilibj.templates.commands.ConveyorControl;
import edu.wpi.first.wpilibj.templates.commands.ConveyorStop;

/**
 *
 * @author Wendy Chan
 */
public class Conveyor extends Subsystem {
    // Put methods for controlling this subsystem
    // here. Call these from Commands.
    private SpeedController motor;

    public void initDefaultCommand() {
        // Set the default command for a subsystem here.
        //setDefaultCommand(new MySpecialCommand());
        //setDefaultCommand(new ConveyorStop());
        setDefaultCommand(new ConveyorControl());
    }

    public Conveyor(){
        motor = new Jaguar(RobotMap.conveyorMotor);
    }

    public void conveyStop(){
        motor.set(0.0);
    }

    public void liftBalls(){
        motor.set(1.0);
    }

    public void lowerBalls(){
        motor.set(-1.0);
    }

    public void move(double conveyorspeed){
        motor.set(conveyorspeed);
    }
}